home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Pearls / libs / bgui / AmigaE / bgui_macros.e next >
Text File  |  1995-06-11  |  25KB  |  965 lines

  1. OPT MODULE
  2. OPT EXPORT
  3. OPT PREPROCESS
  4.  
  5. /*
  6. **    bgui_macros.e - AmigaE v3.1a macro definitions file.
  7. **
  8. **    (C) Copyright 1993-1994 Jaba Development.
  9. **    (C) Copyright 1993-1994 Jan van den Baard.
  10. **    All Rights Reserved.
  11. **
  12. **    A lot of these macros  depend in the 'tools/Boopsi.m'
  13. **    module of the AmigaE 3.0 distribution. Please include
  14. **    this module into your code.
  15. **/
  16.  
  17. /*****************************************************************************
  18.  *
  19.  *    General object creation macros.
  20.  */
  21. #define HGroupObject        BgUI_NewObjectA( BGUI_GROUP_GADGET,    [ TAG_IGNORE, 0
  22. #define VGroupObject        BgUI_NewObjectA( BGUI_GROUP_GADGET,    [ GROUP_STYLE, GRSTYLE_VERTICAL
  23. #define ButtonObject        BgUI_NewObjectA( BGUI_BUTTON_GADGET,    [ TAG_IGNORE, 0
  24. #define ToggleObject        BgUI_NewObjectA( BGUI_BUTTON_GADGET,    [ GA_TOGGLESELECT, TRUE
  25. #define CycleObject        BgUI_NewObjectA( BGUI_CYCLE_GADGET,    [ TAG_IGNORE, 0
  26. #define CheckBoxObject        BgUI_NewObjectA( BGUI_CHECKBOX_GADGET,    [ TAG_IGNORE, 0
  27. #define InfoObject        BgUI_NewObjectA( BGUI_INFO_GADGET,    [ TAG_IGNORE, 0
  28. #define StringObject        BgUI_NewObjectA( BGUI_STRING_GADGET,    [ TAG_IGNORE, 0
  29. #define PropObject        BgUI_NewObjectA( BGUI_PROP_GADGET,    [ TAG_IGNORE, 0
  30. #define IndicatorObject         BgUI_NewObjectA( BGUI_INDICATOR_GADGET, [ TAG_IGNORE, 0
  31. #define ProgressObject        BgUI_NewObjectA( BGUI_PROGRESS_GADGET,    [ TAG_IGNORE, 0
  32. #define SliderObject        BgUI_NewObjectA( BGUI_SLIDER_GADGET,    [ TAG_IGNORE, 0
  33. #define PageObject        BgUI_NewObjectA( BGUI_PAGE_GADGET,    [ TAG_IGNORE, 0
  34. #define MxObject        BgUI_NewObjectA( BGUI_MX_GADGET,    [ TAG_IGNORE, 0
  35. #define ListviewObject        BgUI_NewObjectA( BGUI_LISTVIEW_GADGET,    [ TAG_IGNORE, 0
  36. #define ExternalObject        BgUI_NewObjectA( BGUI_EXTERNAL_GADGET,    [ GA_LEFT, 0, GA_TOP, 0, GA_WIDTH, 0, GA_HEIGHT, 0
  37. #define SeparatorObject         BgUI_NewObjectA( BGUI_SEPARATOR_GADGET, [ TAG_IGNORE, 0
  38. #define SeperatorObject         BgUI_NewObjectA( BGUI_SEPERATOR_GADGET, [ TAG_IGNORE, 0
  39. #define WindowObject        BgUI_NewObjectA( BGUI_WINDOW_OBJECT,    [ TAG_IGNORE, 0
  40. #define FileReqObject        BgUI_NewObjectA( BGUI_FILEREQ_OBJECT,    [ TAG_IGNORE, 0
  41. #define CommodityObject         BgUI_NewObjectA( BGUI_COMMODITY_OBJECT, [ TAG_IGNORE, 0
  42.  
  43. #define EndObject        TAG_END ] )
  44.  
  45. /*****************************************************************************
  46.  *
  47.  *    Frames.
  48.  */
  49. #define ButtonFrame        FRM_TYPE, FRTYPE_BUTTON
  50. #define RidgeFrame        FRM_TYPE, FRTYPE_RIDGE
  51. #define DropBoxFrame        FRM_TYPE, FRTYPE_DROPBOX
  52. #define NeXTFrame        FRM_TYPE, FRTYPE_NEXT
  53. #define RadioFrame        FRM_TYPE, FRTYPE_RADIOBUTTON
  54. #define XenFrame        FRM_TYPE, FRTYPE_XEN_BUTTON
  55.  
  56. /* For clarity. */
  57. #define StringFrame        RidgeFrame
  58. #define MxFrame                 RadioFrame
  59.  
  60. #define FrameTitle(t)        FRM_TITLE, t
  61.  
  62. /* Built-in back fills */
  63. #define ShineRaster        FRM_BACKFILL, SHINE_RASTER
  64. #define ShadowRaster        FRM_BACKFILL, SHADOW_RASTER
  65. #define ShineShadowRaster    FRM_BACKFILL, SHINE_SHADOW_RASTER
  66. #define FillRaster        FRM_BACKFILL, FILL_RASTER
  67. #define ShineFillRaster         FRM_BACKFILL, SHINE_FILL_RASTER
  68. #define ShadowFillRaster    FRM_BACKFILL, SHADOW_FILL_RASTER
  69. #define ShineBlock        FRM_BACKFILL, SHINE_BLOCK
  70. #define ShadowBlock        FRM_BACKFILL, SHADOW_BLOCK
  71.  
  72. /*****************************************************************************
  73.  *
  74.  *    Vector images.
  75.  */
  76. #define GetPath                 VIT_BUILTIN, BUILTIN_GETPATH
  77. #define GetFile                 VIT_BUILTIN, BUILTIN_GETFILE
  78. #define CheckMark        VIT_BUILTIN, BUILTIN_CHECKMARK
  79. #define PopUp            VIT_BUILTIN, BUILTIN_POPUP
  80. #define ArrowUp                 VIT_BUILTIN, BUILTIN_ARROW_UP
  81. #define ArrowDown        VIT_BUILTIN, BUILTIN_ARROW_DOWN
  82. #define ArrowLeft        VIT_BUILTIN, BUILTIN_ARROW_LEFT
  83. #define ArrowRight        VIT_BUILTIN, BUILTIN_ARROW_RIGHT
  84.  
  85. /*****************************************************************************
  86.  *
  87.  *    Group class macros.
  88.  */
  89. #define StartMember        GROUP_MEMBER
  90. #define EndMember        TAG_END, 0
  91. #define Spacing(p)        GROUP_SPACING, p
  92. #define HOffset(p)        GROUP_HORIZOFFSET, p
  93. #define VOffset(p)        GROUP_VERTOFFSET, p
  94. #define LOffset(p)        GROUP_LEFTOFFSET, p
  95. #define ROffset(p)        GROUP_RIGHTOFFSET, p
  96. #define TOffset(p)        GROUP_TOPOFFSET, p
  97. #define BOffset(p)        GROUP_BOTTOMOFFSET, p
  98. #define VarSpace(w)        GROUP_SPACEOBJECT, w
  99. #define EqualWidth        GROUP_EQUALWIDTH, TRUE
  100. #define EqualHeight        GROUP_EQUALHEIGHT, TRUE
  101.  
  102. /*****************************************************************************
  103.  *
  104.  *    Layout macros.
  105.  */
  106. #define FixMinWidth        LGO_FIXMINWIDTH, TRUE
  107. #define FixMinHeight        LGO_FIXMINHEIGHT, TRUE
  108. #define Weight(w)        LGO_WEIGHT, w
  109. #define FixWidth(w)        LGO_FIXWIDTH, w
  110. #define FixHeight(h)        LGO_FIXHEIGHT, h
  111. #define Align            LGO_ALIGN, TRUE
  112. #define FixMinSize        FixMinWidth, FixMinHeight
  113. #define FixSize(w,h)        FixWidth(w), FixHeight(h)
  114. #define NoAlign                 LGO_NOALIGN, TRUE
  115.  
  116. /*****************************************************************************
  117.  *
  118.  *    Page class macros.
  119.  */
  120. #define PageMember        PAGE_MEMBER
  121.  
  122. /*****************************************************************************
  123.  *
  124.  *    "Quick" button creation macros.
  125.  */
  126. #define Button(label,id)\
  127.     ButtonObject,\
  128.         LAB_LABEL,        label,\
  129.         GA_ID,            id,\
  130.         FRM_TYPE,        FRTYPE_BUTTON,\
  131.     EndObject
  132.  
  133. #define KeyButton(label,id)\
  134.     ButtonObject,\
  135.         LAB_LABEL,        label,\
  136.         LAB_UNDERSCORE,         "_",\
  137.         GA_ID,            id,\
  138.         FRM_TYPE,        FRTYPE_BUTTON,\
  139.     EndObject
  140.  
  141. #define Toggle(label,state,id)\
  142.     ToggleObject,\
  143.         LAB_LABEL,        label,\
  144.         GA_ID,            id,\
  145.         GA_SELECTED,        state,\
  146.         FRM_TYPE,        FRTYPE_BUTTON,\
  147.     EndObject
  148.  
  149. #define KeyToggle(label,state,id)\
  150.     ToggleObject,\
  151.         LAB_LABEL,        label,\
  152.         LAB_UNDERSCORE,         "_",\
  153.         GA_ID,            id,\
  154.         GA_SELECTED,        state,\
  155.         FRM_TYPE,        FRTYPE_BUTTON,\
  156.     EndObject
  157.  
  158. #define XenButton(label,id)\
  159.     ButtonObject,\
  160.         LAB_LABEL,        label,\
  161.         GA_ID,            id,\
  162.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  163.     EndObject
  164.  
  165. #define XenKeyButton(label,id)\
  166.     ButtonObject,\
  167.         LAB_LABEL,        label,\
  168.         LAB_UNDERSCORE,         "_",\
  169.         GA_ID,            id,\
  170.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  171.     EndObject
  172.  
  173. #define XenToggle(label,state,id)\
  174.     ToggleObject,\
  175.         LAB_LABEL,        label,\
  176.         GA_ID,            id,\
  177.         GA_SELECTED,        state,\
  178.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  179.     EndObject
  180.  
  181. #define XenKeyToggle(label,state,id)\
  182.     ToggleObject,\
  183.         LAB_LABEL,        label,\
  184.         LAB_UNDERSCORE,         "_",\
  185.         GA_ID,            id,\
  186.         GA_SELECTED,        state,\
  187.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  188.     EndObject
  189. /*****************************************************************************
  190.  *
  191.  *    "Quick" cycle creation macros.
  192.  */
  193. #define Cycle(label,labels,active,id)\
  194.     CycleObject,\
  195.         LAB_LABEL,        label,\
  196.         GA_ID,            id,\
  197.         FRM_TYPE,        FRTYPE_BUTTON,\
  198.         CYC_LABELS,        labels,\
  199.         CYC_ACTIVE,        active,\
  200.     EndObject
  201.  
  202. #define KeyCycle(label,labels,active,id)\
  203.     CycleObject,\
  204.         LAB_LABEL,        label,\
  205.         LAB_UNDERSCORE,         "_",\
  206.         GA_ID,            id,\
  207.         FRM_TYPE,        FRTYPE_BUTTON,\
  208.         CYC_LABELS,        labels,\
  209.         CYC_ACTIVE,        active,\
  210.     EndObject
  211.  
  212. #define XenCycle(label,labels,active,id)\
  213.     CycleObject,\
  214.         LAB_LABEL,        label,\
  215.         GA_ID,            id,\
  216.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  217.         CYC_LABELS,        labels,\
  218.         CYC_ACTIVE,        active,\
  219.     EndObject
  220.  
  221. #define XenKeyCycle(label,labels,active,id)\
  222.     CycleObject,\
  223.         LAB_LABEL,        label,\
  224.         LAB_UNDERSCORE,         "_",\
  225.         GA_ID,            id,\
  226.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  227.         CYC_LABELS,        labels,\
  228.         CYC_ACTIVE,        active,\
  229.     EndObject
  230.  
  231. #define PopCycle(label,labels,active,id)\
  232.     CycleObject,\
  233.         LAB_Label,        label,\
  234.         GA_ID,            id,\
  235.         FRM_TYPE,        FRTYPE_BUTTON,\
  236.         CYC_LABELS,        labels,\
  237.         CYC_ACTIVE,        active,\
  238.         CYC_POPUP,        TRUE,\
  239.     EndObject
  240.  
  241. #define KeyPopCycle(label,labels,active,id)\
  242.     CycleObject,\
  243.         LAB_LABEL,        label,\
  244.         LAB_UNDERSCORE,         "_",\
  245.         GA_ID,            id,\
  246.         FRM_TYPE,        FRTYPE_BUTTON,\
  247.         CYC_LABELS,        labels,\
  248.         CYC_ACTIVE,        active,\
  249.         CYC_POPUP,        TRUE,\
  250.     EndObject
  251.  
  252. #define XenPopCycle(label,labels,active,id)\
  253.     CycleObject,\
  254.         LAB_LABEL,        label,\
  255.         GA_ID,            id,\
  256.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  257.         CYC_LABELS,        labels,\
  258.         CYC_ACTIVE,        active,\
  259.         CYC_POPUP,        TRUE,\
  260.     EndObject
  261.  
  262. #define XenKeyPopCycle(label,labels,active,id)\
  263.     CycleObject,\
  264.         LAB_LABEL,        label,\
  265.         LAB_UNDERSCORE,         "_",\
  266.         GA_ID,            id,\
  267.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  268.         CYC_LABELS,        labels,\
  269.         CYC_ACTIVE,        active,\
  270.         CYC_POPUP,        TRUE,\
  271.     EndObject
  272.  
  273. /*****************************************************************************
  274.  *
  275.  *    "Quick" checkbox creation macros.
  276.  */
  277. #define CheckBox(label,state,id)\
  278.     CheckBoxObject,\
  279.         LAB_LABEL,        label,\
  280.         GA_ID,            id,\
  281.         FRM_TYPE,        FRTYPE_BUTTON,\
  282.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  283.         GA_SELECTED,        state,\
  284.     EndObject, FixMinSize
  285.  
  286. #define KeyCheckBox(label,state,id)\
  287.     CheckBoxObject,\
  288.         LAB_LABEL,        label,\
  289.         LAB_UNDERSCORE,         "_",\
  290.         GA_ID,            id,\
  291.         FRM_TYPE,        FRTYPE_BUTTON,\
  292.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  293.         GA_SELECTED,        state,\
  294.     EndObject, FixMinSize
  295.  
  296. #define XenCheckBox(label,state,id)\
  297.     CheckBoxObject,\
  298.         LAB_LABEL,        label,\
  299.         GA_ID,            id,\
  300.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  301.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  302.         GA_SELECTED,        state,\
  303.     EndObject, FixMinSize
  304.  
  305. #define XenKeyCheckBox(label,state,id)\
  306.     CheckBoxObject,\
  307.         LAB_LABEL,        label,\
  308.         LAB_UNDERSCORE,         "_",\
  309.         GA_ID,            id,\
  310.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  311.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  312.         GA_SELECTED,        state,\
  313.     EndObject, FixMinSize
  314.  
  315. #define CheckBoxNF(label,state,id)\
  316.     CheckBoxObject,\
  317.         LAB_LABEL,        label,\
  318.         GA_ID,            id,\
  319.         FRM_TYPE,        FRTYPE_BUTTON,\
  320.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  321.         GA_SELECTED,        state,\
  322.     EndObject
  323.  
  324. #define KeyCheckBoxNF(label,state,id)\
  325.     CheckBoxObject,\
  326.         LAB_LABEL,        label,\
  327.         LAB_UNDERSCORE,         "_",\
  328.         GA_ID,            id,\
  329.         FRM_TYPE,        FRTYPE_BUTTON,\
  330.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  331.         GA_SELECTED,        state,\
  332.     EndObject
  333.  
  334. #define XenCheckBoxNF(label,state,id)\
  335.     CheckBoxObject,\
  336.         LAB_LABEL,        label,\
  337.         GA_ID,            id,\
  338.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  339.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  340.         GA_SELECTED,        state,\
  341.     EndObject
  342.  
  343. #define XenKeyCheckBoxNF(label,state,id)\
  344.     CheckBoxObject,\
  345.         LAB_LABEL,        label,\
  346.         LAB_UNDERSCORE,         "_",\
  347.         GA_ID,            id,\
  348.         FRM_TYPE,        FRTYPE_XEN_BUTTON,\
  349.         FRM_FLAGS,        FRF_EDGES_ONLY,\
  350.         GA_SELECTED,        state,\
  351.     EndObject
  352.  
  353. /*****************************************************************************
  354.  *
  355.  *    "Quick" info object creation macros.
  356.  */
  357. #define InfoFixed(label,text,args,numlines)\
  358.     InfoObject,\
  359.         LAB_LABEL,        label,\
  360.         FRM_TYPE,        FRTYPE_BUTTON,\
  361.         FRM_FLAGS,        FRF_RECESSED,\
  362.         INFO_TEXTFORMAT,    text,\
  363.         INFO_ARGS,        args,\
  364.         INFO_MINLINES,        numlines,\
  365.         INFO_FIXTEXTWIDTH,    TRUE,\
  366.     EndObject
  367.  
  368. #define InfoObj(label,text,args,numlines)\
  369.     InfoObject,\
  370.         LAB_LABEL,        label,\
  371.         FRM_TYPE,        FRTYPE_BUTTON,\
  372.         FRM_FLAGS,        FRF_RECESSED,\
  373.         INFO_TEXTFORMAT,    text,\
  374.         INFO_ARGS,        args,\
  375.         INFO_MINLINES,        numlines,\
  376.     EndObject
  377.  
  378. /*****************************************************************************
  379.  *
  380.  *    "Quick" string/integer creation macros.
  381.  */
  382. #define StringG(label,contents,maxchars,id)\
  383.     StringObject,\
  384.         LAB_LABEL,        label,\
  385.         FRM_TYPE,        FRTYPE_RIDGE,\
  386.         STRINGA_TEXTVAL,    contents,\
  387.         STRINGA_MAXCHARS,    maxchars,\
  388.         GA_ID,            id,\
  389.     EndObject
  390.  
  391. #define KeyString(label,contents,maxchars,id)\
  392.     StringObject,\
  393.         LAB_LABEL,        label,\
  394.         LAB_UNDERSCORE,         "_",\
  395.         FRM_TYPE,        FRTYPE_RIDGE,\
  396.         STRINGA_TEXTVAL,    contents,\
  397.         STRINGA_MAXCHARS,    maxchars,\
  398.         GA_ID,            id,\
  399.     EndObject
  400.  
  401. #define TabString(label,contents,maxchars,id)\
  402.     StringObject,\
  403.         LAB_LABEL,        label,\
  404.         FRM_TYPE,        FRTYPE_RIDGE,\
  405.         STRINGA_TEXTVAL,    contents,\
  406.         STRINGA_MAXCHARS,    maxchars,\
  407.         GA_ID,            id,\
  408.         GA_TABCYCLE,        TRUE,\
  409.     EndObject
  410.  
  411. #define TabKeyString(label,contents,maxchars,id)\
  412.     StringObject,\
  413.         LAB_LABEL,        label,\
  414.         LAB_UNDERSCORE,         "_",\
  415.         FRM_TYPE,        FRTYPE_RIDGE,\
  416.         STRINGA_TEXTVAL,    contents,\
  417.         STRINGA_MAXCHARS,    maxchars,\
  418.         GA_ID,            id,\
  419.         GA_TABCYCLE,        TRUE,\
  420.     EndObject
  421.  
  422. #define Integer(label,contents,maxchars,id)\
  423.     StringObject,\
  424.         LAB_LABEL,        label,\
  425.         FRM_TYPE,        FRTYPE_RIDGE,\
  426.         STRINGA_LONGVAL,    contents,\
  427.         STRINGA_MAXCHARS,    maxchars,\
  428.         GA_ID,            id,\
  429.     EndObject
  430.  
  431. #define KeyInteger(label,contents,maxchars,id)\
  432.     StringObject,\
  433.         LAB_LABEL,        label,\
  434.         LAB_UNDERSCORE,         "_",\
  435.         FRM_TYPE,        FRTYPE_RIDGE,\
  436.         STRINGA_LONGVAL,    contents,\
  437.         STRINGA_MAXCHARS,    maxchars,\
  438.         GA_ID,            id,\
  439.     EndObject
  440.  
  441. #define TabInteger(label,contents,maxchars,id)\
  442.     StringObject,\
  443.         LAB_LABEL,        label,\
  444.         FRM_TYPE,        FRTYPE_RIDGE,\
  445.         STRINGA_LONGVAL,    contents,\
  446.         STRINGA_MAXCHARS,    maxchars,\
  447.         GA_ID,            id,\
  448.         GA_TABCYCLE,        TRUE,\
  449.     EndObject
  450.  
  451. #define TabKeyInteger(label,contents,maxchars,id)\
  452.     StringObject,\
  453.         LAB_LABEL,        label,\
  454.         LAB_UNDERSCORE,         "_",\
  455.         FRM_TYPE,        FRTYPE_RIDGE,\
  456.         STRINGA_LONGVAL,    contents,\
  457.         STRINGA_MAXCHARS,    maxchars,\
  458.         GA_ID,            id,\
  459.         GA_TABCYCLE,        TRUE,\
  460.     EndObject
  461.  
  462. /*****************************************************************************
  463.  *
  464.  *    "Quick" scroller creation macros.
  465.  */
  466. #define HorizScroller(label,top,total,visible,id)\
  467.     PropObject,\
  468.         LAB_LABEL,        label,\
  469.         PGA_TOP,        top,\
  470.         PGA_TOTAL,        total,\
  471.         PGA_VISIBLE,        visible,\
  472.         PGA_FREEDOM,        FREEHORIZ,\
  473.         GA_ID,            id,\
  474.         PGA_ARROWS,        TRUE,\
  475.     EndObject
  476.  
  477. #define VertScroller(label,top,total,visible,id)\
  478.     PropObject,\
  479.         LAB_LABEL,        label,\
  480.         PGA_TOP,        top,\
  481.         PGA_TOTAL,        total,\
  482.         PGA_VISIBLE,        visible,\
  483.         GA_ID,            id,\
  484.         PGA_ARROWS,        TRUE,\
  485.     EndObject
  486.  
  487. #define KeyHorizScroller(label,top,total,visible,id)\
  488.     PropObject,\
  489.         LAB_LABEL,        label,\
  490.         LAB_UNDERSCORE,         "_",\
  491.         PGA_TOP,        top,\
  492.         PGA_TOTAL,        total,\
  493.         PGA_VISIBLE,        visible,\
  494.         PGA_FREEDOM,        FREEHORIZ,\
  495.         GA_ID,            id,\
  496.         PGA_ARROWS,        TRUE,\
  497.     EndObject
  498.  
  499. #define KeyVertScroller(label,top,total,visible,id)\
  500.     PropObject,\
  501.         LAB_LABEL,        label,\
  502.         LAB_UNDERSCORE,         "_",\
  503.         PGA_TOP,        top,\
  504.         PGA_TOTAL,        total,\
  505.         PGA_VISIBLE,        visible,\
  506.         GA_ID,            id,\
  507.         PGA_ARROWS,        TRUE,\
  508.     EndObject
  509.  
  510. /*****************************************************************************
  511.  *
  512.  *    "Quick" indicator creation macros.
  513.  */
  514. #define Indicator(min,max,level,just)\
  515.     IndicatorObject,\
  516.         INDIC_MIN,        min,\
  517.         INDIC_MAX,        max,\
  518.         INDIC_LEVEL,        level,\
  519.         INDIC_JUSTIFICATION,    just,\
  520.     EndObject
  521.  
  522. #define IndicatorFormat(min,max,level,just,format)\
  523.     IndicatorObject,\
  524.         INDIC_MIN,        min,\
  525.         INDIC_MAX,        max,\
  526.         INDIC_LEVEL,        level,\
  527.         INDIC_JUSTIFICATION,    just,\
  528.         INDIC_FORMATSTRING,    format,\
  529.     EndObject
  530.  
  531. /*****************************************************************************
  532.  *
  533.  *    "Quick" progress creation macros.
  534.  */
  535. #define HorizProgress(label,min,max,done)\
  536.     ProgressObject,\
  537.         LAB_LABEL,        label,\
  538.         FRM_TYPE,        FRTYPE_BUTTON,\
  539.         FRM_FLAGS,        FRF_RECESSED,\
  540.         PROGRESS_MIN,        min,\
  541.         PROGRESS_MAX,        max,\
  542.         PROGRESS_DONE,        done,\
  543.     EndObject
  544.  
  545. #define VertProgress(label,min,max,done)\
  546.     ProgressObject,\
  547.         LAB_LABEL,        label,\
  548.         FRM_TYPE,        FRTYPE_BUTTON,\
  549.         FRM_FLAGS,        FRF_RECESSED,\
  550.         PROGRESS_MIN,        min,\
  551.         PROGRESS_MAX,        max,\
  552.         PROGRESS_DONE,        done,\
  553.         PROGRESS_VERTICAL,    TRUE,\
  554.     EndObject
  555.  
  556. /*****************************************************************************
  557.  *
  558.  *    "Quick" slider creation macros.
  559.  */
  560. #define HorizSlider(label,min,max,level,id)\
  561.     SliderObject,\
  562.         LAB_LABEL,        label,\
  563.         SLIDER_MIN,        min,\
  564.         SLIDER_MAX,        max,\
  565.         SLIDER_LEVEL,        level,\
  566.         GA_ID,            id,\
  567.     EndObject
  568.  
  569. #define VertSlider(label,min,max,level,id)\
  570.     SliderObject,\
  571.         LAB_LABEL,        label,\
  572.         SLIDER_MIN,        min,\
  573.         SLIDER_MAX,        max,\
  574.         SLIDER_LEVEL,        level,\
  575.         PGA_FREEDOM,        FREEVERT,\
  576.         GA_ID,            id,\
  577.     EndObject
  578.  
  579. #define KeyHorizSlider(label,min,max,level,id)\
  580.     SliderObject,\
  581.         LAB_LABEL,        label,\
  582.         LAB_UNDERSCORE,         "_",\
  583.         SLIDER_MIN,        min,\
  584.         SLIDER_MAX,        max,\
  585.         SLIDER_LEVEL,        level,\
  586.         GA_ID,            id,\
  587.     EndObject
  588.  
  589. #define KeyVertSlider(label,min,max,level,id)\
  590.     SliderObject,\
  591.         LAB_LABEL,        label,\
  592.         LAB_UNDERSCORE,         "_",\
  593.         SLIDER_MIN,        min,\
  594.         SLIDER_MAX,        max,\
  595.         SLIDER_LEVEL,        level,\
  596.         PGA_FREEDOM,        FREEVERT,\
  597.         GA_ID,            id,\
  598.     EndObject
  599.  
  600. /*****************************************************************************
  601.  *
  602.  *    "Quick" mx creation macros.
  603.  */
  604. #define RightMx(label,labels,active,id)\
  605.     MxObject,\
  606.         GROUP_STYLE,        GRSTYLE_VERTICAL,\
  607.         LAB_LABEL,        label,\
  608.         MX_LABELS,        labels,\
  609.         MX_ACTIVE,        active,\
  610.         GA_ID,            id,\
  611.     EndObject, FixMinSize
  612.  
  613. #define LeftMx(label,labels,active,id)\
  614.     MxObject,\
  615.         GROUP_STYLE,        GRSTYLE_VERTICAL,\
  616.         LAB_LABEL,        label,\
  617.         MX_LABELS,        labels,\
  618.         MX_ACTIVE,        active,\
  619.         MX_LABELPLACE,        PLACE_LEFT,\
  620.         GA_ID,            id,\
  621.     EndObject, FixMinSize
  622.  
  623. #define RightMxKey(label,labels,active,id)\
  624.     MxObject,\
  625.         GROUP_STYLE,        GRSTYLE_VERTICAL,\
  626.         LAB_LABEL,        label,\
  627.         LAB_UNDERSCORE,         "_",\
  628.         MX_LABELS,        labels,\
  629.         MX_ACTIVE,        active,\
  630.         GA_ID,            id,\
  631.     EndObject, FixMinSize
  632.  
  633. #define LeftMxKey(label,labels,active,id)\
  634.     MxObject,\
  635.         GROUP_STYLE,        GRSTYLE_VERTICAL,\
  636.         LAB_LABEL,        label,\
  637.         LAB_UNDERSCORE,         "_",\
  638.         MX_LABELS,        labels,\
  639.         MX_ACTIVE,        active,\
  640.         MX_LABELPLACE,        PLACE_LEFT,\
  641.         GA_ID,            id,\
  642.     EndObject, FixMinSize
  643.  
  644. #define Tabs(label,labels,active,id)\
  645.     MxObject,\
  646.         MX_TABSOBJECT,        TRUE,\
  647.         LAB_LABEL,        label,\
  648.         MX_LABELS,        labels,\
  649.         MX_ACTIVE,        active,\
  650.         GA_ID,            id,\
  651.     EndObject, FixMinHeight
  652.  
  653. #define TabsKey(label,labels,active,id)\
  654.     MxObject,\
  655.         MX_TABSOBJECT,        TRUE,\
  656.         LAB_LABEL,        label,\
  657.         LAB_UNDERSCORE,         '_',\
  658.         MX_LABELS,        labels,\
  659.         MX_ACTIVE,        active,\
  660.         GA_ID,            id,\
  661.     EndObject, FixMinHeight
  662.  
  663. #define TabsEqual(label,labels,active,id)\
  664.     MxObject,\
  665.         GROUP_EQUALWIDTH,    TRUE,\
  666.         MX_TABSOBJECT,        TRUE,\
  667.         LAB_LABEL,        label,\
  668.         MX_LABELS,        labels,\
  669.         MX_ACTIVE,        active,\
  670.         GA_ID,            id,\
  671.     EndObject, FixMinHeight
  672.  
  673. #define TabsEqualKey(label,labels,active,id)\
  674.     MxObject,\
  675.         GROUP_EQUALWIDTH,    TRUE,\
  676.         MX_TABSOBJECT,        TRUE,\
  677.         LAB_LABEL,        label,\
  678.         LAB_UNDERSCORE,         '_',\
  679.         MX_LABELS,        labels,\
  680.         MX_ACTIVE,        active,\
  681.         GA_ID,            id,\
  682.     EndObject, FixMinHeight
  683.  
  684. /*****************************************************************************
  685.  *
  686.  *    "Quick" listview creation macros.
  687.  */
  688. #define StrListview(label,strings,id)\
  689.     ListviewObject,\
  690.         LAB_LABEL,        label,\
  691.         GA_ID,            id,\
  692.         LISTV_ENTRYARRAY,    strings,\
  693.     EndObject
  694.  
  695. #define StrListviewSorted(label,strings,id)\
  696.     ListviewObject,\
  697.         LAB_LABEL,        label,\
  698.         GA_ID,            id,\
  699.         LISTV_ENTRYARRAY,    strings,\
  700.         LISTV_SORTENTRYARRAY,    TRUE,\
  701.     EndObject
  702.  
  703. #define ReadStrListview(label,strings)\
  704.     ListviewObject,\
  705.         LAB_LABEL,        label,\
  706.         LISTV_ENTRYARRAY,    strings,\
  707.         LISTV_READONLY,         TRUE,\
  708.     EndObject
  709.  
  710. #define ReadStrListviewSorted(label,strings)\
  711.     ListviewObject,\
  712.         LAB_LABEL,        label,\
  713.         LISTV_ENTRYARRAY,    strings,\
  714.         LISTV_SORTENTRYARRAY,    TRUE,\
  715.         LISTV_READONLY,         TRUE,\
  716.     EndObject
  717.  
  718. #define MultiStrListview(label,strings,id)\
  719.     ListviewObject,\
  720.         LAB_LABEL,        label,\
  721.         GA_ID,            id,\
  722.         LISTV_ENTRYARRAY,    strings,\
  723.         LISTV_MULTISELECT,    TRUE,\
  724.     EndObject
  725.  
  726. #define MultiStrListviewSorted(label,strings,id)\
  727.     ListviewObject,\
  728.         LAB_LABEL,        label,\
  729.         GA_ID,            id,\
  730.         LISTV_ENTRYARRAY,    strings,\
  731.         LISTV_SORTENTRYARRAY,    TRUE,\
  732.         LISTV_MULTISELECT,    TRUE,\
  733.     EndObject
  734.  
  735. /*****************************************************************************
  736.  *
  737.  *    "Quick" separator bar creation macros.
  738.  */
  739. #define VertSeparator \
  740.     SeparatorObject,\
  741.     EndObject, FixMinWidth
  742.  
  743. #define VertThinSeparator \
  744.     SeparatorObject,\
  745.         SEP_THIN,        TRUE,\
  746.     EndObject, FixMinWidth
  747.  
  748. #define HorizSeparator \
  749.     SeparatorObject,\
  750.         SEP_HORIZ,        TRUE,\
  751.     EndObject, FixMinHeight
  752.  
  753. #define TitleSeparator(t)\
  754.     SeparatorObject,\
  755.         SEP_HORIZ,        TRUE,\
  756.         SEP_TITLE,        t,\
  757.     EndObject, FixMinHeight
  758.  
  759. #define HTitleSeparator(t)\
  760.     SeparatorObject,\
  761.         SEP_HORIZ,        TRUE,\
  762.         SEP_TITLE,        t,\
  763.         SEP_HIGHLIGHT,        TRUE,\
  764.     EndObject, FixMinHeight
  765.  
  766. #define CTitleSeparator(t)\
  767.     SeparatorObject,\
  768.         SEP_HORIZ,        TRUE,\
  769.         SEP_TITLE,        t,\
  770.         SEP_CENTERTITLE,    TRUE,\
  771.     EndObject, FixMinHeight
  772.  
  773. #define CHTitleSeparator(t)\
  774.     SeparatorObject,\
  775.         SEP_HORIZ,        TRUE,\
  776.         SEP_TITLE,        t,\
  777.         SEP_HIGHLIGHT,        TRUE,\
  778.         SEP_CENTERTITLE,    TRUE,\
  779.     EndObject, FixMinHeight
  780.  
  781. /* Typos */
  782. #define VertSeperator        VertSeparator
  783. #define VertThinSeperator    VertThinSeparator
  784. #define HorizSeperator        HorizSeparator
  785. #define TitleSeperator        TitleSeparator
  786. #define HTitleSeperator         HTitleSeparator
  787. #define CTitleSeperator         CTitleSeparator
  788. #define CHTitleSeperator    CHTitleSeparator
  789.  
  790. /*****************************************************************************
  791.  *
  792.  *    Base class method macros.
  793.  */
  794. #define AddMap(object,target,map)\
  795.     domethod( object, [ BASE_ADDMAP, target, map ] )
  796.  
  797. #define AddCondit(object,target,ttag,tdat,ftag,fdat,stag,sdat)\
  798.     domethod( object, [ BASE_ADDCONDITIONAL, target,\
  799.           ttag, tdat,\
  800.           ftag, fdat,\
  801.           stag, sdat ] )
  802.  
  803. #define AddHook(object,hook)\
  804.     domethod( object, [ BASE_ADDHOOK, hook ] )
  805.  
  806. #define RemMap(object,target)\
  807.     domethod( object, [ BASE_REMMAP, target  ] )
  808.  
  809. #define RemCondit(object,target)\
  810.     domethod( object, [ BASE_REMCONDITIONAL, target ] )
  811.  
  812. #define RemHook( object,hook)\
  813.     domethod( object, [ BASE_REMHOOK, hook ] )
  814.  
  815. /*****************************************************************************
  816.  *
  817.  *    Listview class method macros.
  818.  */
  819. #define AddEntry(window,object,entry,how)\
  820.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_ADDSINGLE,\
  821.                  NIL, entry, how, 0 ] )
  822.  
  823. #define AddEntryVisible(window,object,entry,how)\
  824.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_ADDSINGLE,\
  825.                  NIL, entry, how, LVASF_MAKEVISIBLE ] )
  826.  
  827. #define AddEntrySelect(window,object,entry,how)\
  828.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_ADDSINGLE,\
  829.                  NIL, entry, how, LVASF_SELECT ] )
  830.  
  831. #define ClearList(window,object)\
  832.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_CLEAR, NIL ] )
  833.  
  834. #define FirstEntry(object)\
  835.     domethod( object, [ LVM_FIRSTENTRY, NIL, 0 ] )
  836.  
  837. #define FirstSelected(object)\
  838.     domethod( object, [ LVM_FIRSTENTRY, NIL, LVGEF_SELECTED ] )
  839.  
  840. #define LastEntry(object)\
  841.     domethod( object, [ LVM_LASTENTRY, NIL, 0 ] )
  842.  
  843. #define LastSelected(object)\
  844.     domethod( object, [ LVM_LASTENTRY, NIL, LVGEF_SELECTED ] )
  845.  
  846. #define NextEntry(object,last)\
  847.     domethod( object, [ LVM_NEXTENTRY, last, 0 ] )
  848.  
  849. #define NextSelected(object,last)\
  850.     domethod( object, [ LVM_NEXTENTRY, last, LVGEF_SELECTED ] )
  851.  
  852. #define PrevEntry(object,last)\
  853.     domethod( object, [ LVM_PREVENTRY, last, 0 ] )
  854.  
  855. #define PrevSelected(object,last)\
  856.     domethod( object, [ LVM_PREVENTRY, last, LVGEF_SELECTED ] )
  857.  
  858. #define RemoveEntry(object,entry)\
  859.     domethod( object, [ LVM_REMENTRY, NIL, entry ] )
  860.  
  861. #define RemoveEntryVisible(window,object,entry)\
  862.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_REMENTRY, NIL, entry ] )
  863.  
  864. #define RefreshList(window,object)\
  865.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_REFRESH, NIL ] )
  866.  
  867. #define SortList(window,object)\
  868.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_SORT, NIL ] )
  869.  
  870. #define LockList(object)\
  871.     domethod( object, [ LVM_LOCKLIST, NIL ] )
  872.  
  873. #define UnlockList(window,object)\
  874.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_UNLOCKLIST, NIL ] )
  875.  
  876. #define MoveEntry(window,object,entry,dir)\
  877.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_MOVE, NIL,\
  878.                  entry, dir ] )
  879.  
  880. #define MoveSelectedEntry(window,object,dir)\
  881.     BgUI_DoGadgetMethodA( object, window, NIL, [ LVM_MOVE, NIL,\
  882.                  NIL, dir ] )
  883.  
  884. #define ReplaceEntry(window,object,old,new)\
  885.     BgUI_DoGadgetMethodA( object, window, NULL, [ LVM_REPLACE, NIL,\
  886.                  old, new ] )
  887.  
  888. /*****************************************************************************
  889.  *
  890.  *    Window class method macros.
  891.  */
  892. #define GadgetKey(wobj,gobj,key)\
  893.     domethod( wobj, [ WM_GADGETKEY, NIL, gobj, key ] )
  894.  
  895. #define WindowOpen(wobj)\
  896.     domethod( wobj, [ WM_OPEN ] )
  897.  
  898. #define WindowClose(wobj)\
  899.     domethod( wobj, [ WM_CLOSE ] )
  900.  
  901. #define WindowBusy(wobj)\
  902.     domethod( wobj, [ WM_SLEEP ] )
  903.  
  904. #define WindowReady(wobj)\
  905.     domethod( wobj, [ WM_WAKEUP ] )
  906.  
  907. #define HandleEvent(wobj)\
  908.     domethod( wobj, [ WM_HANDLEIDCMP ] )
  909.  
  910. #define DisableMenu(wobj,id,set)\
  911.     domethod( wobj, [ WM_DISABLEMENU, id, set ] )
  912.  
  913. #define CheckItem(wobj,id,set)\
  914.     domethod( wobj, [ WM_CHECKITEM, id, set ] )
  915.  
  916. #define MenuDisabled(wobj,id)\
  917.     domethod( wobj, [ WM_MENUDISABLED, id ] )
  918.  
  919. #define ItemChecked(wobj,id)\
  920.     domethod( wobj, [ WM_ITEMCHECKED, id ] )
  921.  
  922. #define GetAppMsg(wobj)\
  923.     domethod( wobj, [ WM_GETAPPMSG ] )
  924.  
  925. #define AddUpdate(wobj,id,target,map)\
  926.     domethod( wobj, [ WM_ADDUPDATE, id, target, map ] )
  927.  
  928. #define GetSignalWindow(wobj)\
  929.     domethod( wobj, [ WM_GET_SIGNAL_WINDOW ] )
  930.  
  931. /*****************************************************************************
  932.  *
  933.  *    Commodity class method macros.
  934.  */
  935. #define AddHotkey(broker,desc,id,flags)\
  936.     domethod( broker, [ CM_ADDHOTKEY, desc, id, flags ] )
  937.  
  938. #define RemHotkey(broker,id)\
  939.     domethod( broker, [ CM_REMHOTKEY, id ] )
  940.  
  941. #define DisableHotkey(broker,id)\
  942.     domethod( broker, [ CM_DISABLEHOTKEY, id ] )
  943.  
  944. #define EnableHotKey(broker,id)\
  945.     domethod( broker, [ CM_ENABLEHOTKEY, id ] )
  946.  
  947. #define EnableBroker(broker)\
  948.     domethod( broker, [ CM_ENABLEBROKER ] )
  949.  
  950. #define DisableBroker(broker)\
  951.     domethod( broker, [ CM_DISABLEBROKER ] )
  952.  
  953. #define MsgInfo(broker,type,id,data)\
  954.     domethod( broker, [ CM_MSGINFO,\
  955.                 type,\
  956.                 id,\
  957.                 data ] )
  958.  
  959. /*****************************************************************************
  960.  *
  961.  *    FileReq class method macros.
  962.  */
  963. #define DoRequest(object)\
  964.     domethod( object, [ FRM_DOREQUEST ] )
  965.